package com.ctshk.rpc.airexpress.service;

import com.ctshk.common.dto.Result;
import com.ctshk.common.model.PageResponse;
import com.ctshk.rpc.airexpress.dto.*;
import com.ctshk.rpc.airexpress.dto.app.TicketNameDTO;
import com.ctshk.rpc.airexpress.req.*;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 机场快线表 服务类
 * </p>
 *
 * @author 谢诗宏
 * @since 2021-02-05
 */
public interface IAirportExpressService {
    Result<List<AirportExpressDTO>> selectResourceList();

    Result<List<AirportExpressDTO>> selectProductList();

    Result updateBatch(AirportExpressUpdateBatchReq airportExpressUpdateBatchReq, Long userId);

    Result update(AirportExpressUpdateReq airportExpressReq, Long userId);

    Result updateSaleStatus(AirportExpressUpdateSaleStatusReq airportExpressUpdateSaleStatusReq, Long userId);

    AirportExpressInfoDTO selectInfo(Long id);

    Result<AirportExpressInfoDTO> selectDetail(Long id);

    /**
     * 根据当前用户ID，查询预订机场快线列表
     *
     * @param userId
     * @return
     */
    Result<List<AirportExpressReservationDTO>> selectReservationList(Long userId);

    /**
     * 根据机场快讯id，查询预订中心预订时可以用于代理的代理商列表
     *
     * @param id
     * @return
     */
    Result<List<AirportExpressReservationAgentDTO>> selectReservationAgentListById(Long id);

    /**
     * 根据机场快线id和用户id和saleChannelId
     * 查询用户的加幅后价格和余票信息,售出数量增加
     *
     * @param airportExpressIncreaseStrategyPriceQueryReq
     * @return
     */
    AirportExpressPriceRemainderDTO selectPriceRemainderAndLock(AirportExpressIncreaseStrategyPriceQueryReq airportExpressIncreaseStrategyPriceQueryReq);

    /**
     * 获取退改手续费
     *
     * @param airportExpressId
     * @param receivableAmount
     * @return
     */
    BigDecimal getCancellationChargeById(Long airportExpressId, BigDecimal receivableAmount);

    /**
     * 分页查询产品列表接口(银联优惠模块)
     */
    PageResponse<AirportExpressPageDTO> getPage(AirportExpressPageReq airportExpressPageReq);

    /**
     * 根据产品ID列表查询产品列表接口(银联优惠模块)
     */
    List<AirportExpressDTO> getListByIds(List<Long> ids);

    TicketNameDTO selectTicketNameById(Long airportExpressId);
}
